#ifndef _UTILS_SHADER_H_
#define _UTILS_SHADER_H_

#include <string>
#include "OpenglAppFramework/inc/glm/glm.hpp"

class Shader {
public:
    Shader();
    ~Shader();

    int createAndBuild(const std::string& vtx, const std::string& frag);
    void use();
    void destroy();
    uint32_t getPorgramId() const;

    void setBool(const std::string &name, bool value) const;
    void setInt(const std::string &name, int value) const;
    void setUint(const std::string &name, unsigned int value) const;
    void setFloat(const std::string &name, float value) const;
    void setVec2(const std::string &name, const glm::vec2 &value) const;
    void setVec2(const std::string &name, float x, float y) const;
    void setVec3(const std::string &name, const glm::vec3 &value) const;
    void setVec3(const std::string &name, float x, float y, float z) const;
    void setVec4(const std::string &name, const glm::vec4 &value) const;
    void setVec4(const std::string &name, float x, float y, float z, float w) const;
    void setMat2(const std::string &name, const glm::mat2 &mat) const;
    void setMat3(const std::string &name, const glm::mat3 &mat) const;
    void setMat4(const std::string &name, const glm::mat4 &mat) const;

private:
    unsigned int m_vtx_shader_id;
    unsigned int m_frag_shader_id;
    unsigned int m_program_id;
};

extern Shader DefaultShader;

#endif//_UTILS_SHADER_H_
